#ifndef CENEMY_H
#define CENEMY_H

#include "cAI_Entity.h"
#include "cAABB.h"

struct EnemyStats
{
	//Health stat which govern
	//the life of the enemy
	int health;

	//Strength stat which governs the power which the
	//enemy attack
	int strength;

	//Defense stat which governs the enemy ability to take damage
	int defense;

	//Percentage stats which showcase the enemies
	//resistances to the different elements
	float resistance;
	float fire_resistance;
	float ice_resistance;
	float holy_resistance;
	float dark_resistance;
};

class cEnemy
{
	public:
		//Constructor and Destructor
		cEnemy(Vector3D position = NULL);
		~cEnemy();

		//Polymorphic Functions
		virtual void updateEnemy() {}
		virtual void renderEnemy() {}

		char		getType() { return m_type; }
		void		setType(char type) { m_type = type; }
		
		float		getPosX() { return m_position.getX(); }
		void		setPosX(float posX) { m_position.setX(posX); }

		float		getPosY() { return m_position.getY(); }
		void		setPosY(float posY) { m_position.setY(posY); }

		bool		getScreenPresence() { return m_bIsOnScreen; }
		void		setScreenPresence(bool bIsOnScreen) { m_bIsOnScreen = m_bIsOnScreen; }

		bool		getInMotion() { return m_bInMotion; }
		void		setInMotion(bool bInMotion) { m_bInMotion = bInMotion; }

		bool		getCanAttack() { return m_bCanAttack; }
		void		setCanAttack(bool bCanAttack) { m_bCanAttack = bCanAttack; }

		EnemyStats	getEnemyStats() { return m_enemyStats; }

	protected:
		//Holds the enemy stats which will resolve
		//the combat information
		EnemyStats	m_enemyStats;

		//Artificial Intelligence with getting the
		//enemy to behave and move
		cAI_Entity	m_aiEntity;

		//Holds the enemy bounding box
		AABB		m_bound;

	private:
		bool		m_bCanAttack;
		bool		m_bInMotion;
		bool		m_bIsOnScreen;

		Vector3D	m_position;
		float		m_orientation;

		char		m_type;
};

class Skeleton : public cEnemy
{
	public:
		Skeleton(char type = NULL);
		~Skeleton();

		void updateEnemy();
		void renderEnemy();
};

class Glob : public cEnemy
{
	public:
		Glob(char type = NULL);
		~Glob();

		void updateEnemy();
		void renderEnemy();
};

class Ghoul : public cEnemy
{
	public:
		Ghoul(char type = NULL);
		~Ghoul();

		void updateEnemy();
		void renderEnemy();
};

class Wisp : public cEnemy
{
	public:
		Wisp(char type = NULL);
		~Wisp();

		void updateEnemy();
		void renderEnemy();
};

class SkeletonKnight : public cEnemy
{
	public:
		SkeletonKnight(char type = NULL);
		~SkeletonKnight();

		void updateEnemy();
		void renderEnemy();
};

class SlimeLord : public cEnemy
{
	public:
		SlimeLord(char type = NULL);
		~SlimeLord();

		void updateEnemy();
		void renderEnemy();
};

class GiantWisp : public cEnemy
{
	public:
		GiantWisp(char type = NULL);
		~GiantWisp();

		void updateEnemy();
		void renderEnemy();
};

class Garnok : public cEnemy
{
	public:
		Garnok(char type = NULL);
		~Garnok();

		void updateEnemy();
		void renderEnemy();
};

#endif